#include<bits/stdc++.h>
using namespace std;
struct trg{
	int x,y;
	int L;
	friend trg operator*(trg A,trg B){
		if(A.L == 0 || B.L == 0){
			return {0,0,0};
		}
		int px = max(A.x,B.x);
		int py = max(A.y,B.y);
		int La = A.L - (px - A.x) - (py - A.y);
		int Lb = B.L - (px - B.x) - (py - B.y);
		return {px,py,max(min(La,Lb),0)};
	}
	long long S(){
		return 1ll*L*L;
	}
} ts[20];
int main(){
	int n;
	cin>>n;
	for(int i = 0;i<n;i++){
		cin>>ts[i].x>>ts[i].y>>ts[i].L;
	}
	long long ans = 0;
	int mask = (1<<n) - 1;
	for(int S = 1;S < (1<<n);S++)
	{
		if(__builtin_popcount(S) & 1){
			int Ss = __builtin_popcount(S);
			long long res = 0;
			//cerr<<" "<<bitset<10>(S)<<'\n';
			int vl = (~S)&mask;
			for(int T = vl;~T;T = T - 1){
				T = T&vl;
				int RT = (~T)&mask;
				//cerr<<bitset<10>(RT)<<'\n';
				trg tg = {0x3f3f3f3f,0x3f3f3f3f,0};
				for(int i = 0;i < n;i++){
					if((RT >> i)&1){
						if(tg.x == 0x3f3f3f3f){
							tg = ts[i];
						}else{
							tg = tg * ts[i];
						}
					}
				}
				//cerr<<tg.x<<' '<<tg.y<<' '<<tg.L<<'\n';
				int Ts = __builtin_popcount(RT);
				if((Ts - Ss)&1){
					res = res - tg.S();
				}else{
					res = res + tg.S();
				}
			}
			//cerr<<' '<<res<<'\n';
			ans += res;
		}
	}
	cout<<fixed<<setprecision(1)<<ans/2.0<<'\n';
}